package com.indeep.indeepmasterstation.service.impl;

import com.indeep.common.err.InDeepException;
import com.indeep.common.result.JsonResult;
import com.indeep.indeepmasterstation.feign.CommunityFeignClient;
import com.indeep.indeepmasterstation.feign.LoginUserFeignClient;
import com.indeep.indeepmasterstation.mapper.AppMessageListMapper;
import com.indeep.indeepmasterstation.mapper.po.AppMessageListPO;
import com.indeep.indeepmasterstation.service.ILoginService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

@Service
public class LoginServiceImpl  implements ILoginService {

    @Resource
    LoginUserFeignClient loginUserFeignClient;

    @Resource
    CommunityFeignClient communityFeignClient;
    @Resource
    AppMessageListMapper appMessageListMapper;


    @Override
    public JsonResult sendCode(String phoneNumber) {
     //  JsonResult<Integer> result  =loginUserFeignClient.sendCode(phoneNumber);


        JsonResult result  =loginUserFeignClient.sendCode(phoneNumber);
        if (result.getCode() !=200){
           throw new InDeepException("code 获取异常",400);
       }
        return result;
    }

}
